home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / winterp-1.13 / examples / Scale.lsp < prev    next >
Encoding:
Lisp/Scheme  |  1991-10-05  |  2.3 KB  |  70 lines

  1. ; -*-Lisp-*-
  2. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  3. ;
  4. ; File:         scale-widg.lsp
  5. ; RCS:          $Header: Scale.lsp,v 1.2 91/10/05 04:03:06 mayer Exp $
  6. ; Description:  XmScale widget tests.
  7. ; Author:       Niels Mayer, HPLabs
  8. ; Created:      Sat Jul  7 21:43:32 1990
  9. ; Modified:     Sat Oct  5 04:02:32 1991 (Niels Mayer) mayer@hplnpm
  10. ; Language:     Lisp
  11. ; Package:      N/A
  12. ; Status:       X11r5 contrib tape release
  13. ;
  14. ; WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  15. ; XLISP version 2.1, Copyright (c) 1989, by David Betz.
  16. ;
  17. ; Permission to use, copy, modify, distribute, and sell this software and its
  18. ; documentation for any purpose is hereby granted without fee, provided that
  19. ; the above copyright notice appear in all copies and that both that
  20. ; copyright notice and this permission notice appear in supporting
  21. ; documentation, and that the name of Hewlett-Packard and Niels Mayer not be
  22. ; used in advertising or publicity pertaining to distribution of the software
  23. ; without specific, written prior permission.  Hewlett-Packard and Niels Mayer
  24. ; makes no representations about the suitability of this software for any
  25. ; purpose.  It is provided "as is" without express or implied warranty.
  26. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  27.  
  28. (setq toplevel_w
  29.       (send TOP_LEVEL_SHELL_WIDGET_CLASS :new "sclshl"
  30.         :XMN_TITLE "Winterp:SCALE TEST"
  31.         :XMN_ICON_NAME "W:SCALE TEST"
  32.         ))
  33.  
  34. (setq rc_w
  35.       (send XM_ROW_COLUMN_WIDGET_CLASS :new :managed
  36.         "rc" toplevel_w
  37.         :XMN_ORIENTATION :HORIZONTAL
  38.         :XMN_PACKING :PACK_COLUMN
  39.         :XMN_ENTRY_ALIGNMENT :ALIGNMENT_CENTER
  40.         ))
  41.  
  42. (setq scale0_w 
  43.       (send XM_SCALE_WIDGET_CLASS :new :managed "scale" rc_w
  44.         :XMN_TITLE_STRING "Utterness\nCoefficient"
  45.         :XMN_SENSITIVE t
  46.         ))
  47. (send XM_LABEL_WIDGET_CLASS :new :managed "100" scale0_w
  48.       )
  49. (send XM_LABEL_WIDGET_CLASS :new :managed "50" scale0_w
  50.       )
  51. (send XM_LABEL_WIDGET_CLASS :new :managed "0" scale0_w
  52.       )
  53.  
  54. (setq scale1_w 
  55.       (send XM_SCALE_WIDGET_CLASS :new :managed "scale" rc_w
  56.         :XMN_TITLE_STRING "lameness\nper\nsecond^2"
  57.         :XMN_SENSITIVE t
  58.         :XMN_SHOW_VALUE t
  59.         ))
  60.  
  61. (send toplevel_w :realize)
  62.  
  63. (send scale0_w :set_value 50)
  64. (send scale1_w :get_value)
  65.  
  66.  
  67.  
  68.  
  69.  
  70.